package com.bwie.bargain.service.impl;

import com.bwie.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.awt.*;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.common.utils.PageUtils;
import com.bwie.common.utils.Query;

import com.bwie.bargain.dao.BargainDao;
import com.bwie.bargain.entity.BargainEntity;
import com.bwie.bargain.service.BargainService;


@Service("bargainService")
public class BargainServiceImpl extends ServiceImpl<BargainDao, BargainEntity> implements BargainService {

    @Autowired
    private BargainDao bargainDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<BargainEntity> page = this.page(
                new Query<BargainEntity>().getPage(params),
                new QueryWrapper<BargainEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<BargainEntity> lists() {
        return bargainDao.lists();
    }


}
